const http = require('http')

http.createServer((req,res)=>{
    console.log(req.method)
    req.pipe(process.stdout)
    res.end('success')
}).listen(8080)

console.log("server is listening 8080")